package file_manage

import (
	"game-time-management/types"
	"os"
	"strconv"
)

func Write(start int64, end int64) error {
	file, err := os.OpenFile(types.Filepath, os.O_WRONLY|os.O_TRUNC, 0644)
	if err != nil {
		return err
	}
	text := strconv.FormatInt(start, 10) + " " + strconv.FormatInt(end, 10)
	file.Write([]byte(text))
	return err
}
